/**
 * IHIS 1.0 created by 김민호, 이충희, 이성연, 신경민 SEP 8기 KAIST 
 */
package ihis.core;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author 김민호 
 *
 */
public class IHISUtil {
	public synchronized static boolean isEmpty(String value){
		if(value == null || "".equals(value) || "null".equals(value)){
			return true;
		}
		return false;
	}
	
	public synchronized static String nullCheck(String value){
		if(value == null || "null".equals(value)){
			return "";
		}
		return value;
	}
	
	public synchronized static String nullCheck(String value, String replace){
		if(value == null || "".equals(value) || "null".equals(value)){
			return replace;
		}
		return value;
	}
	
	public synchronized static String dateToStr(Date date){
		if(date == null) return "";
		
		return new SimpleDateFormat("yyyy-MM-dd").format(date);
	}
}
